<template>
	<view>
		<view class="personalItem flex flexBei" v-for="(item, index) in list" :key="index" @click="navtoPersonal(item.poorId)">
			<image :src="item.purikura" ></image>
			<view class="personal_info">
				<view class="header_info flex flexBei">
					<text>{{item.poorName}}</text>
					<text>{{item.poorPhone}}</text>
				</view>
				<view class="extent">
					贫困程度:<u-rate :count="5" v-model="item.poorGrade" disabled></u-rate>
				</view>
				<view class="address textHd">
					居住地址: {{item.homeAddress}}
				</view>
			</view>
		</view>
		<u-empty mode="list" text="结果为空" v-show="(list.length == 0)"></u-empty>
	</view>
</template>

<script>
	export default {
		name: 'poverty',
		props: {
		  list: {
			  type: Array,
			  required: true,
			  default() {
			  	return []
			  }
		  }
		},
		methods: {
			// 跳转到用户详情
			navtoPersonal (id) {
			  uni.navigateTo({
				url: `../poverty_details/poverty_details?id=${id}`
			  })
			},
		}
	}
</script>

<style lang="less" scoped>
.personalItem {
	&:first-child {
		margin-top: 0;
		border-radius: 0 24rpx;
	}
		padding: 24rpx;
		background-color: #fff;
		margin-top: 18rpx;
		border-radius: 24rpx;
		image {
			width: 120rpx;
			height: 120rpx;
			border-radius: 12rpx;
		}
		.personal_info {
			width: 550rpx;
		}
	}
</style>
